package Nio;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

/**
 * description:
 * author:zcx
 * lenovo
 * 时间：2022.01.20.13.20
 */
public class Nio5 {
    public static void main(String[] args) throws IOException {
       //读取字符文件
        var p= Paths.get("");
        List<String> text= Files.readAllLines(p);
        text.forEach(System.out::println);

//读取字节byte[]
       var b= Files.readAllBytes(Paths.get(""));
       //写入文件
       Files.write(Paths.get(""),b);
    }
}
